import pkg from '../../package.json';

// System default cache time, in seconds
export const DEFAULT_CACHE_TIME = 60 * 60 * 24 * 7;

// AES encryption key
export const cacheCipher = {
  key: '_11111000001111@',
  iv: '@11111000001111_',
};

// Whether the system cache is encrypted using aes
export const enableStorageEncryption = !import.meta.env.DEV;

export function getStoragePrefixKey() {
  const showName = import.meta.env.VITE_GLOB_APP_SHORT_NAME;
  return `${showName}${`__${pkg.version}__`}`.toUpperCase();
}
